package cn.sfrog.common.enums;

public enum UserTypeEnum {

    /**系统用户**/
    SYSTEM("00", "系统用户"),

    /**会员**/
    MEMBER("10", "会员"),

    /**陪诊**/
    ESCORT("20", "陪诊"),

    /**护工**/
    CARE_WORKER("30", "护工"),

    /**护士**/
    CARE_NURSE("40", "护士"),

    /**医生**/
    DOCTOR("50", "医生"),
    /**客服*/
    CUSTOMER_SERVICE("60", "客服");


    private String code;
    private String name;


    UserTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public static UserTypeEnum getInstance(String code) {
        UserTypeEnum[] values = values();
        for (UserTypeEnum userTypeEnum : values) {
            if (userTypeEnum.code.equals(code)) {
                return userTypeEnum;
            }
        }
        return null;
    }
}
